#include"pollServer.hpp"
#include"err.hpp"
#include<memory>
using namespace select_ns;
static void usage(std::string proc)
{
    std::cerr << "Usage:\n\t" << proc << " port" << "\n\n";
}

std::string transaction(const std::string &request)
{
    return request;
}

int main(int argc ,char* argv[])
{
    if(argc != 2)
    {
        usage(argv[0]);
        exit(USAGE_ERR);
    }
    uint16_t port = atoi(argv[1]);
    unique_ptr<PollServer> svr(new PollServer(transaction,port));
    svr->initServer();
    svr->start();

}